3.4 \(\int \frac{\csc ^2(x)}{a+a \csc (x)} \, dx\)

Optimal. Leaf size=20 \[ \frac{\cot (x)}{a \csc (x)+a}-\frac{\tanh ^{-1}(\cos (x))}{a} \]

[Out]

-(ArcTanh[Cos[x]]/a) + Cot[x]/(a + a*Csc[x])

________________________________________________________________________________________

Rubi [A]  time = 0.0560358, antiderivative size = 20, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {3789, 3770, 3794} \[ \frac{\cot (x)}{a \csc (x)+a}-\frac{\tanh ^{-1}(\cos (x))}{a} \]

Antiderivative was successfully verified.

[In]

Int[Csc[x]^2/(a + a*Csc[x]),x]

[Out]

-(ArcTanh[Cos[x]]/a) + Cot[x]/(a + a*Csc[x])

Rule 3789

Int[csc[(e_.) + (f_.)*(x_)]^2/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[1/b, Int[Csc[e + f*x],
 x], x] - Dist[a/b, Int[Csc[e + f*x]/(a + b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3794

Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> -Simp[Cot[e + f*x]/(f*(b + a*
Csc[e + f*x])), x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin{align*} \int \frac{\csc ^2(x)}{a+a \csc (x)} \, dx &=\frac{\int \csc (x) \, dx}{a}-\int \frac{\csc (x)}{a+a \csc (x)} \, dx\\ &=-\frac{\tanh ^{-1}(\cos (x))}{a}+\frac{\cot (x)}{a+a \csc (x)}\\ \end{align*}

Mathematica [B]  time = 0.0528889, size = 44, normalized size = 2.2 \[ \frac{\log \left (\sin \left (\frac{x}{2}\right )\right )-\log \left (\cos \left (\frac{x}{2}\right )\right )-\frac{2 \sin \left (\frac{x}{2}\right )}{\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )}}{a} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]^2/(a + a*Csc[x]),x]

[Out]

(-Log[Cos[x/2]] + Log[Sin[x/2]] - (2*Sin[x/2])/(Cos[x/2] + Sin[x/2]))/a

________________________________________________________________________________________

Maple [A]  time = 0.027, size = 24, normalized size = 1.2 \begin{align*} 2\,{\frac{1}{a \left ( \tan \left ( x/2 \right ) +1 \right ) }}+{\frac{1}{a}\ln \left ( \tan \left ({\frac{x}{2}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)^2/(a+a*csc(x)),x)

[Out]

2/a/(tan(1/2*x)+1)+1/a*ln(tan(1/2*x))

________________________________________________________________________________________

Maxima [A]  time = 0.969735, size = 42, normalized size = 2.1 \begin{align*} \frac{\log \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{a} + \frac{2}{a + \frac{a \sin \left (x\right )}{\cos \left (x\right ) + 1}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^2/(a+a*csc(x)),x, algorithm="maxima")

[Out]

log(sin(x)/(cos(x) + 1))/a + 2/(a + a*sin(x)/(cos(x) + 1))

________________________________________________________________________________________

Fricas [B]  time = 0.480746, size = 204, normalized size = 10.2 \begin{align*} -\frac{{\left (\cos \left (x\right ) + \sin \left (x\right ) + 1\right )} \log \left (\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) -{\left (\cos \left (x\right ) + \sin \left (x\right ) + 1\right )} \log \left (-\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) - 2 \, \cos \left (x\right ) + 2 \, \sin \left (x\right ) - 2}{2 \,{\left (a \cos \left (x\right ) + a \sin \left (x\right ) + a\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^2/(a+a*csc(x)),x, algorithm="fricas")

[Out]

-1/2*((cos(x) + sin(x) + 1)*log(1/2*cos(x) + 1/2) - (cos(x) + sin(x) + 1)*log(-1/2*cos(x) + 1/2) - 2*cos(x) +
2*sin(x) - 2)/(a*cos(x) + a*sin(x) + a)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\csc ^{2}{\left (x \right )}}{\csc{\left (x \right )} + 1}\, dx}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)**2/(a+a*csc(x)),x)

[Out]

Integral(csc(x)**2/(csc(x) + 1), x)/a

________________________________________________________________________________________

Giac [A]  time = 1.36932, size = 32, normalized size = 1.6 \begin{align*} \frac{\log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) \right |}\right )}{a} + \frac{2}{a{\left (\tan \left (\frac{1}{2} \, x\right ) + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^2/(a+a*csc(x)),x, algorithm="giac")

[Out]

log(abs(tan(1/2*x)))/a + 2/(a*(tan(1/2*x) + 1))